home *** CD-ROM | disk | FTP | other *** search
Emacs Compiled Lisp | 1998-10-28 | 2.6 KB |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: Emacs Compiled Lisp
(other/emacsCompiledLisp).
This format is not currently supported by dexvert.
Confidence | Program | Detection | Match Type | Support
|
---|
1%
| dexvert
| Emacs Compiled Lisp (other/emacsCompiledLisp)
| magic
| Unsupported |
100%
| file
| Emacs/XEmacs v19 byte-compiled Lisp data
| default
| |
99%
| file
| data
| default
| |
100%
| TrID
| Emacs/XEmacs byte-compiled Lisp (generic)
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3b 45 4c 43 13 00 00 00 | 0a 3b 3b 3b 20 63 6f 6d |;ELC....|.;;; com|
|00000010| 70 69 6c 65 64 20 62 79 | 20 65 72 69 6b 40 6e 61 |piled by| erik@na|
|00000020| 67 67 75 6d 2e 6e 6f 20 | 6f 6e 20 53 75 6e 20 4a |ggum.no |on Sun J|
|00000030| 61 6e 20 31 34 20 30 36 | 3a 33 30 3a 31 32 20 31 |an 14 06|:30:12 1|
|00000040| 39 39 36 0a 3b 3b 3b 20 | 66 72 6f 6d 20 66 69 6c |996.;;; |from fil|
|00000050| 65 20 2f 67 64 2f 67 6e | 75 2f 65 6d 61 63 73 2f |e /gd/gn|u/emacs/|
|00000060| 31 39 2e 30 2f 6c 69 73 | 70 2f 72 69 6e 67 2e 65 |19.0/lis|p/ring.e|
|00000070| 6c 0a 3b 3b 3b 20 65 6d | 61 63 73 20 76 65 72 73 |l.;;; em|acs vers|
|00000080| 69 6f 6e 20 31 39 2e 33 | 30 2e 37 30 2e 36 2e 0a |ion 19.3|0.70.6..|
|00000090| 3b 3b 3b 20 62 79 74 65 | 63 6f 6d 70 20 76 65 72 |;;; byte|comp ver|
|000000a0| 73 69 6f 6e 20 46 53 46 | 20 32 2e 31 30 0a 3b 3b |sion FSF| 2.10.;;|
|000000b0| 3b 20 6f 70 74 69 6d 69 | 7a 61 74 69 6f 6e 20 69 |; optimi|zation i|
|000000c0| 73 20 6f 6e 2e 0a 3b 3b | 3b 20 74 68 69 73 20 66 |s on..;;|; this f|
|000000d0| 69 6c 65 20 75 73 65 73 | 20 6f 70 63 6f 64 65 73 |ile uses| opcodes|
|000000e0| 20 77 68 69 63 68 20 64 | 6f 20 6e 6f 74 20 65 78 | which d|o not ex|
|000000f0| 69 73 74 20 69 6e 20 45 | 6d 61 63 73 20 31 38 2e |ist in E|macs 18.|
|00000100| 0a 0a 28 69 66 20 28 61 | 6e 64 20 28 62 6f 75 6e |..(if (a|nd (boun|
|00000110| 64 70 20 27 65 6d 61 63 | 73 2d 76 65 72 73 69 6f |dp 'emac|s-versio|
|00000120| 6e 29 0a 09 20 28 6f 72 | 20 28 61 6e 64 20 28 62 |n).. (or| (and (b|
|00000130| 6f 75 6e 64 70 20 27 65 | 70 6f 63 68 3a 3a 76 65 |oundp 'e|poch::ve|
|00000140| 72 73 69 6f 6e 29 20 65 | 70 6f 63 68 3a 3a 76 65 |rsion) e|poch::ve|
|00000150| 72 73 69 6f 6e 29 0a 09 | 20 20 20 20 20 28 73 74 |rsion)..| (st|
|00000160| 72 69 6e 67 2d 6c 65 73 | 73 70 20 65 6d 61 63 73 |ring-les|sp emacs|
|00000170| 2d 76 65 72 73 69 6f 6e | 20 22 31 39 2e 32 39 22 |-version| "19.29"|
|00000180| 29 29 29 0a 20 20 20 20 | 28 65 72 72 6f 72 20 22 |))). |(error "|
|00000190| 60 72 69 6e 67 2e 65 6c | 27 20 77 61 73 20 63 6f |`ring.el|' was co|
|000001a0| 6d 70 69 6c 65 64 20 66 | 6f 72 20 45 6d 61 63 73 |mpiled f|or Emacs|
|000001b0| 20 31 39 2e 32 39 20 6f | 72 20 6c 61 74 65 72 22 | 19.29 o|r later"|
|000001c0| 29 29 0a 0a 0a 23 40 34 | 32 20 52 65 74 75 72 6e |))...#@4|2 Return|
|000001d0| 73 20 74 20 69 66 20 58 | 20 69 73 20 61 20 72 69 |s t if X| is a ri|
|000001e0| 6e 67 3b 20 6e 69 6c 20 | 6f 74 68 65 72 77 69 73 |ng; nil |otherwis|
|000001f0| 65 2e 1f 0a 28 64 65 66 | 61 6c 69 61 73 20 27 72 |e...(def|alias 'r|
|00000200| 69 6e 67 2d 70 20 23 5b | 28 78 29 20 22 08 3a 85 |ing-p #[|(x) ".:.|
|00000210| 1d 00 08 40 a8 85 1d 00 | 08 41 3a 85 1d 00 08 41 |...@....|.A:....A|
|00000220| 40 a8 85 1d 00 c1 08 41 | 41 21 87 22 20 5b 78 20 |@......A|A!." [x |
|00000230| 76 65 63 74 6f 72 70 5d | 20 32 20 28 23 24 20 2e |vectorp]| 2 (#$ .|
|00000240| 20 34 35 38 29 5d 29 0a | 23 40 34 35 20 4d 61 6b | 458)]).|#@45 Mak|
|00000250| 65 20 61 20 72 69 6e 67 | 20 74 68 61 74 20 63 61 |e a ring| that ca|
|00000260| 6e 20 63 6f 6e 74 61 69 | 6e 20 53 49 5a 45 20 65 |n contai|n SIZE e|
|00000270| 6c 65 6d 65 6e 74 73 2e | 1f 0a 28 64 65 66 61 6c |lements.|..(defal|
|00000280| 69 61 73 20 27 6d 61 6b | 65 2d 72 69 6e 67 20 23 |ias 'mak|e-ring #|
|00000290| 5b 28 73 69 7a 65 29 20 | 22 c0 89 c1 5c 6e c3 5c |[(size) |"...\n.\|
|000002a0| 22 42 42 87 22 20 5b 30 | 20 6d 61 6b 65 2d 76 65 |"BB." [0| make-ve|
|000002b0| 63 74 6f 72 20 73 69 7a | 65 20 6e 69 6c 5d 20 35 |ctor siz|e nil] 5|
|000002c0| 20 28 23 24 20 2e 20 35 | 38 39 29 5d 29 0a 23 40 | (#$ . 5|89)]).#@|
|000002d0| 36 36 20 41 64 64 20 74 | 6f 20 52 49 4e 47 20 74 |66 Add t|o RING t|
|000002e0| 68 65 20 69 74 65 6d 20 | 49 54 45 4d 2e 20 20 41 |he item |ITEM. A|
|000002f0| 64 64 20 69 74 20 61 74 | 20 74 68 65 20 66 72 6f |dd it at| the fro|
|00000300| 6e 74 20 28 74 68 65 20 | 65 61 72 6c 79 20 65 6e |nt (the |early en|
|00000310| 64 29 2e 1f 0a 28 64 65 | 66 61 6c 69 61 73 20 27 |d)...(de|falias '|
|00000320| 72 69 6e 67 2d 69 6e 73 | 65 72 74 2d 61 74 2d 62 |ring-ins|ert-at-b|
|00000330| 65 67 69 6e 6e 69 6e 67 | 20 23 5b 28 72 69 6e 67 |eginning| #[(ring|
|00000340| 20 69 74 65 6d 29 20 22 | 08 41 41 89 19 47 1a 08 | item) "|.AA..G..|
|00000350| 40 1b 08 41 40 1c 5c 6e | 5c 66 54 5e 14 c5 0b 5c |@..A@.\n|\fT^...\|
|00000360| 6e 5c 22 13 09 0b 0e 06 | 49 88 08 0b a0 88 08 41 |n\".....|I......A|
|00000370| 5c 66 a0 2c 87 22 20 5b | 72 69 6e 67 20 76 65 63 |\f.,." [|ring vec|
|00000380| 20 76 65 63 6c 65 6e 20 | 68 64 20 6c 6e 20 72 69 | veclen |hd ln ri|
|00000390| 6e 67 2d 6d 69 6e 75 73 | 31 20 69 74 65 6d 5d 20 |ng-minus|1 item] |
|000003a0| 34 20 28 23 24 20 2e 20 | 37 32 33 29 5d 29 0a 23 |4 (#$ . |723)]).#|
|000003b0| 40 32 36 20 49 4e 44 45 | 58 2b 31 2c 20 77 69 74 |@26 INDE|X+1, wit|
|000003c0| 68 20 77 72 61 70 61 72 | 6f 75 6e 64 1f 0a 28 64 |h wrapar|ound..(d|
|000003d0| 65 66 61 6c 69 61 73 20 | 27 72 69 6e 67 2d 70 6c |efalias |'ring-pl|
|000003e0| 75 73 31 20 23 5b 28 69 | 6e 64 65 78 20 76 65 63 |us1 #[(i|ndex vec|
|000003f0| 6c 65 6e 29 20 22 08 c1 | 5c 5c 89 1a 0b 55 83 0e |len) "..|\\...U..|
|00000400| 00 c4 82 0f 00 5c 6e 29 | 87 22 20 5b 69 6e 64 65 |.....\n)|." [inde|
|00000410| 78 20 31 20 6e 65 77 2d | 69 6e 64 65 78 20 76 65 |x 1 new-|index ve|
|00000420| 63 6c 65 6e 20 30 5d 20 | 33 20 28 23 24 20 2e 20 |clen 0] |3 (#$ . |
|00000430| 39 34 38 29 5d 29 0a 23 | 40 32 36 20 49 4e 44 45 |948)]).#|@26 INDE|
|00000440| 58 2d 31 2c 20 77 69 74 | 68 20 77 72 61 70 61 72 |X-1, wit|h wrapar|
|00000450| 6f 75 6e 64 1f 0a 28 64 | 65 66 61 6c 69 61 73 20 |ound..(d|efalias |
|00000460| 27 72 69 6e 67 2d 6d 69 | 6e 75 73 31 20 23 5b 28 |'ring-mi|nus1 #[(|
|00000470| 69 6e 64 65 78 20 76 65 | 63 6c 65 6e 29 20 22 08 |index ve|clen) ".|
|00000480| c1 55 83 5c 6e 00 5c 6e | 82 0b 00 08 c3 5a 87 22 |.U.\n.\n|.....Z."|
|00000490| 20 5b 69 6e 64 65 78 20 | 30 20 76 65 63 6c 65 6e | [index |0 veclen|
|000004a0| 20 31 5d 20 32 20 28 23 | 24 20 2e 20 31 30 38 34 | 1] 2 (#|$ . 1084|
|000004b0| 29 5d 29 0a 23 40 33 33 | 20 4e 75 6d 62 65 72 20 |)]).#@33| Number |
|000004c0| 6f 66 20 65 6c 65 6d 65 | 6e 74 73 20 69 6e 20 74 |of eleme|nts in t|
|000004d0| 68 65 20 72 69 6e 67 2e | 1f 0a 28 64 65 66 61 6c |he ring.|..(defal|
|000004e0| 69 61 73 20 27 72 69 6e | 67 2d 6c 65 6e 67 74 68 |ias 'rin|g-length|
|000004f0| 20 23 5b 28 72 69 6e 67 | 29 20 22 08 41 40 87 22 | #[(ring|) ".A@."|
|00000500| 20 5b 72 69 6e 67 5d 20 | 31 20 28 23 24 20 2e 20 | [ring] |1 (#$ . |
|00000510| 31 32 30 39 29 5d 29 0a | 28 64 65 66 61 6c 69 61 |1209)]).|(defalia|
|00000520| 73 20 27 72 69 6e 67 2d | 65 6d 70 74 79 2d 70 20 |s 'ring-|empty-p |
|00000530| 23 5b 28 72 69 6e 67 29 | 20 22 08 41 40 c1 55 87 |#[(ring)| ".A@.U.|
|00000540| 22 20 5b 72 69 6e 67 20 | 30 5d 20 32 5d 29 0a 28 |" [ring |0] 2]).(|
|00000550| 64 65 66 61 6c 69 61 73 | 20 27 72 69 6e 67 2d 69 |defalias| 'ring-i|
|00000560| 6e 64 65 78 20 23 5b 28 | 69 6e 64 65 78 20 68 65 |ndex #[(|index he|
|00000570| 61 64 20 72 69 6e 67 6c | 65 6e 20 76 65 63 6c 65 |ad ringl|en vecle|
|00000580| 6e 29 20 22 c0 09 5c 6e | 5c 22 11 c0 0b 5c 6e 09 |n) "..\n|\"...\n.|
|00000590| 5a 5c 5c 53 5c 66 5c 22 | 87 22 20 5b 6d 6f 64 20 |Z\\S\f\"|." [mod |
|000005a0| 69 6e 64 65 78 20 72 69 | 6e 67 6c 65 6e 20 68 65 |index ri|nglen he|
|000005b0| 61 64 20 76 65 63 6c 65 | 6e 5d 20 34 5d 29 0a 23 |ad vecle|n] 4]).#|
|000005c0| 40 31 32 31 20 49 6e 73 | 65 72 74 20 6f 6e 74 6f |@121 Ins|ert onto|
|000005d0| 20 72 69 6e 67 20 52 49 | 4e 47 20 74 68 65 20 69 | ring RI|NG the i|
|000005e0| 74 65 6d 20 49 54 45 4d | 2c 20 61 73 20 74 68 65 |tem ITEM|, as the|
|000005f0| 20 6e 65 77 65 73 74 20 | 28 6c 61 73 74 29 20 69 | newest |(last) i|
|00000600| 74 65 6d 2e 0a 49 66 20 | 74 68 65 20 72 69 6e 67 |tem..If |the ring|
|00000610| 20 69 73 20 66 75 6c 6c | 2c 20 64 75 6d 70 20 74 | is full|, dump t|
|00000620| 68 65 20 6f 6c 64 65 73 | 74 20 69 74 65 6d 20 74 |he oldes|t item t|
|00000630| 6f 20 6d 61 6b 65 20 72 | 6f 6f 6d 2e 1f 0a 28 64 |o make r|oom...(d|
|00000640| 65 66 61 6c 69 61 73 20 | 27 72 69 6e 67 2d 69 6e |efalias |'ring-in|
|00000650| 73 65 72 74 20 23 5b 28 | 72 69 6e 67 20 69 74 65 |sert #[(|ring ite|
|00000660| 6d 29 20 22 08 41 41 89 | 19 47 1a 08 40 1b 08 41 |m) ".AA.|.G..@..A|
|00000670| 40 1c 09 c5 0b 5c 66 5c | 5c 5c 6e 5c 22 0e 06 49 |@....\f\|\\n\"..I|
|00000680| 5c 66 5c 6e 55 83 28 00 | 08 c7 0b 5c 6e 5c 22 a0 |\f\nU.(.|...\n\".|
|00000690| 88 82 2e 00 08 41 5c 66 | 54 a0 88 2c 87 22 20 5b |.....A\f|T..,." [|
|000006a0| 72 69 6e 67 20 76 65 63 | 20 76 65 63 6c 65 6e 20 |ring vec| veclen |
|000006b0| 68 64 20 6c 6e 20 6d 6f | 64 20 69 74 65 6d 20 72 |hd ln mo|d item r|
|000006c0| 69 6e 67 2d 70 6c 75 73 | 31 5d 20 36 20 28 23 24 |ing-plus|1] 6 (#$|
|000006d0| 20 2e 20 31 34 37 37 29 | 5d 29 0a 23 40 31 35 33 | . 1477)|]).#@153|
|000006e0| 20 52 65 6d 6f 76 65 20 | 61 6e 20 69 74 65 6d 20 | Remove |an item |
|000006f0| 66 72 6f 6d 20 74 68 65 | 20 52 49 4e 47 2e 20 20 |from the| RING. |
|00000700| 52 65 74 75 72 6e 20 74 | 68 65 20 72 65 6d 6f 76 |Return t|he remov|
|00000710| 65 64 20 69 74 65 6d 2e | 0a 49 66 20 6f 70 74 69 |ed item.|.If opti|
|00000720| 6f 6e 61 6c 20 49 4e 44 | 45 58 20 69 73 20 6e 69 |onal IND|EX is ni|
|00000730| 6c 2c 20 72 65 6d 6f 76 | 65 20 74 68 65 20 6f 6c |l, remov|e the ol|
|00000740| 64 65 73 74 20 69 74 65 | 6d 2e 20 20 49 66 20 69 |dest ite|m. If i|
|00000750| 74 27 73 0a 6e 75 6d 65 | 72 69 63 2c 20 72 65 6d |t's.nume|ric, rem|
|00000760| 6f 76 65 20 74 68 65 20 | 65 6c 65 6d 65 6e 74 20 |ove the |element |
|00000770| 69 6e 64 65 78 65 64 2e | 1f 0a 28 64 65 66 61 6c |indexed.|..(defal|
|00000780| 69 61 73 20 27 72 69 6e | 67 2d 72 65 6d 6f 76 65 |ias 'rin|g-remove|
|00000790| 20 23 5b 28 72 69 6e 67 | 20 26 6f 70 74 69 6f 6e | #[(ring| &option|
|000007a0| 61 6c 20 69 6e 64 65 78 | 29 20 22 c0 09 21 83 5c |al index|) "..!.\|
|000007b0| 6e 00 c2 c3 21 87 09 40 | 1c 09 41 40 1d 09 41 41 |n...!..@|..A@..AA|
|000007c0| 89 1e 06 47 1e 07 c8 5c | 66 0d 5c 5c 53 0e 07 5c |...G...\|f.\\S..\|
|000007d0| 22 1e 09 ca 1e 0b 0e 5c | 66 84 30 00 0d 53 16 5c |"......\|f.0..S.\|
|000007e0| 66 cd 0e 5c 66 5c 66 0d | 0e 07 24 16 5c 66 0e 06 |f..\f\f.|..$.\f..|
|000007f0| 0e 5c 66 48 16 0b 0e 5c | 66 0e 09 55 84 64 00 0e |.\fH...\|f..U.d..|
|00000800| 06 0e 5c 66 0e 06 ce 0e | 5c 66 0e 07 5c 22 48 49 |..\f....|\f..\"HI|
|00000810| 88 ce 0e 5c 66 0e 07 5c | 22 89 16 5c 66 82 43 00 |...\f..\|"..\f.C.|
|00000820| 0e 06 0e 09 ca 49 88 09 | 41 0d 53 a0 88 0e 0b 2e |.....I..|A.S.....|
|00000830| 06 87 22 20 5b 72 69 6e | 67 2d 65 6d 70 74 79 2d |.." [rin|g-empty-|
|00000840| 70 20 72 69 6e 67 20 65 | 72 72 6f 72 20 22 52 69 |p ring e|rror "Ri|
|00000850| 6e 67 20 65 6d 70 74 79 | 22 20 68 64 20 6c 6e 20 |ng empty|" hd ln |
|00000860| 76 65 63 20 76 65 63 6c | 65 6e 20 6d 6f 64 20 74 |vec vecl|en mod t|
|00000870| 6c 20 6e 69 6c 20 6f 6c | 64 65 6c 74 20 69 6e 64 |l nil ol|delt ind|
|00000880| 65 78 20 72 69 6e 67 2d | 69 6e 64 65 78 20 72 69 |ex ring-|index ri|
|00000890| 6e 67 2d 70 6c 75 73 31 | 5d 20 37 20 28 23 24 20 |ng-plus1|] 7 (#$ |
|000008a0| 2e 20 31 37 36 31 29 5d | 29 0a 23 40 32 32 34 20 |. 1761)]|).#@224 |
|000008b0| 52 65 74 75 72 6e 73 20 | 52 49 4e 47 27 73 20 49 |Returns |RING's I|
|000008c0| 4e 44 45 58 20 65 6c 65 | 6d 65 6e 74 2e 0a 49 4e |NDEX ele|ment..IN|
|000008d0| 44 45 58 20 6e 65 65 64 | 20 6e 6f 74 20 62 65 20 |DEX need| not be |
|000008e0| 3c 3d 20 74 68 65 20 72 | 69 6e 67 20 6c 65 6e 67 |<= the r|ing leng|
|000008f0| 74 68 2c 20 74 68 65 20 | 61 70 70 72 6f 70 72 69 |th, the |appropri|
|00000900| 61 74 65 20 6d 6f 64 75 | 6c 6f 20 6f 70 65 72 61 |ate modu|lo opera|
|00000910| 74 69 6f 6e 0a 77 69 6c | 6c 20 62 65 20 70 65 72 |tion.wil|l be per|
|00000920| 66 6f 72 6d 65 64 2e 20 | 20 45 6c 65 6d 65 6e 74 |formed. | Element|
|00000930| 20 30 20 69 73 20 74 68 | 65 20 6d 6f 73 74 20 72 | 0 is th|e most r|
|00000940| 65 63 65 6e 74 6c 79 20 | 69 6e 73 65 72 74 65 64 |ecently |inserted|
|00000950| 3b 20 68 69 67 68 65 72 | 20 69 6e 64 69 63 65 73 |; higher| indices|
|00000960| 0a 63 6f 72 72 65 73 70 | 6f 6e 64 20 74 6f 20 6f |.corresp|ond to o|
|00000970| 6c 64 65 72 20 65 6c 65 | 6d 65 6e 74 73 20 75 6e |lder ele|ments un|
|00000980| 74 69 6c 20 74 68 65 79 | 20 77 72 61 70 2e 1f 0a |til they| wrap...|
|00000990| 28 64 65 66 61 6c 69 61 | 73 20 27 72 69 6e 67 2d |(defalia|s 'ring-|
|000009a0| 72 65 66 20 23 5b 28 72 | 69 6e 67 20 69 6e 64 65 |ref #[(r|ing inde|
|000009b0| 78 29 20 22 c0 09 21 83 | 5c 6e 00 c2 c3 21 87 09 |x) "..!.|\n...!..|
|000009c0| 40 1c 09 41 40 1d 09 41 | 41 89 1e 06 c7 0e 08 5c |@..A@..A|A......\|
|000009d0| 66 0d 0e 06 47 24 48 2b | 87 22 20 5b 72 69 6e 67 |f...G$H+|." [ring|
|000009e0| 2d 65 6d 70 74 79 2d 70 | 20 72 69 6e 67 20 65 72 |-empty-p| ring er|
|000009f0| 72 6f 72 20 22 69 6e 64 | 65 78 65 64 20 65 6d 70 |ror "ind|exed emp|
|00000a00| 74 79 20 72 69 6e 67 22 | 20 68 64 20 6c 6e 20 76 |ty ring"| hd ln v|
|00000a10| 65 63 20 72 69 6e 67 2d | 69 6e 64 65 78 20 69 6e |ec ring-|index in|
|00000a20| 64 65 78 5d 20 37 20 28 | 23 24 20 2e 20 32 32 32 |dex] 7 (|#$ . 222|
|00000a30| 34 29 5d 29 0a 28 70 72 | 6f 76 69 64 65 20 28 71 |4)]).(pr|ovide (q|
|00000a40| 75 6f 74 65 20 72 69 6e | 67 29 29 0a |uote rin|g)). |
+--------+-------------------------+-------------------------+--------+--------+